﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ICeFramework.Utilities.IO
{
    public static class IOUtil
    {
        public static bool DeleteDirectoryContents(string path)
        {
            try
            {
                foreach (string file in Directory.GetFiles(path))
                {
                    File.Delete(file);
                }
                foreach (string dir in Directory.GetDirectories(path))
                {
                    Directory.Delete(dir, true);
                }
                return true;
            }
            catch { return false; }
        }
    }
}
